package com.example.teacher_app.tch_activity.tchInfomation;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.example.teacher_app.BuildConfig;
import com.example.teacher_app.R;
import com.example.teacher_app.data.TeacherData;
import com.example.teacher_app.databinding.ActivityTchInfoBinding;
import com.example.teacher_app.tch_activity.tchInfomation.bean.Data;
import com.example.teacher_app.tch_activity.tchInfomation.bean.TchInfoTBean;
import com.example.teacher_app.util.HttpUtil;
import com.google.gson.Gson;

import java.io.IOException;
import java.util.HashMap;

public class TchInfoActivity extends AppCompatActivity {

    private ActivityTchInfoBinding tchdataBinding;

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setStatusBarColor(0xFF4682B4);
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        tchdataBinding = DataBindingUtil.setContentView(this,R.layout.activity_tch_info);

        tchdataBinding.back.setOnClickListener(view -> finish());

        tchdataBinding.setTeacher(TeacherData.TeacherBean);
        Glide.with(TchInfoActivity.this).load(TeacherData.TeacherBean.getData().get(0).getTchPhoto()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(tchdataBinding.image);
    }
}